package cn.iocoder.an.module.business.controller.admin.repairtask.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.*;

import jakarta.validation.constraints.*;

import java.math.BigDecimal;

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 维修任务新增/修改 Request VO")
@Data
public class RepairTaskSaveReqVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22676")
    private Long id;

    @Schema(description = "维修申请单", requiredMode = Schema.RequiredMode.REQUIRED, example = "25798")
    @NotNull(message = "维修申请单不能为空")
    private Long repairId;

    @Schema(description = "维修分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "21144")
    @NotNull(message = "维修分类不能为空")
    private Long maintenanceId;

    @Schema(description = "设备", requiredMode = Schema.RequiredMode.REQUIRED, example = "13217")
    @NotNull(message = "设备不能为空")
    private Long equipmentId;

    @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime startTime;

    @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime endTime;

    @Schema(description = "维修时长(分钟)")
    private Integer repairDuration;

    @Schema(description = "维修成本(元)")
    private BigDecimal repairCost;

    @Schema(description = "是否解决")
    private Integer resolved;

    @Schema(description = "故障分析", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "故障分析不能为空")
    private String faultAnalysis;

    @Schema(description = "维修事项", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "维修事项不能为空")
    private String repairItem;


    //状态 用于更新申请表
    private Integer status;

}